import pyautogui
import time
import pyperclip as clip
import pandas as pd
import datetime
import json

str = '{"seriesType":"bar","yAxisData":["\u9910\u5385\u6210\u5957\u5bb6\u5177","\u529f\u80fd\u623f\u6210\u5957\u5bb6\u5177","\u5ba2\u5385\u6210\u5957\u5bb6\u5177","\u95e8\u5385\u6210\u5957\u5bb6\u5177","\u5176\u4ed6\u6210\u5957\u5bb6\u5177","\u4e66\u623f\u6210\u5957\u5bb6\u5177","\u5367\u5ba4\u6210\u5957\u5bb6\u5177"],"seriesBarGap":0,"ifDataZoom":1,"series":[{"name":"\u9500\u91cf","data":[318,0,1475,2,0,0,23]},{"name":"\u9500\u552e\u989d","data":[99730.25,0,912283.76,1196,0,0,13626.9]}]}'
debugJson = json.loads(str)
test = {'catLeaf': debugJson['yAxisData'],
        'salesVolume': debugJson['series'][0]['data'],
        'salesAmount': debugJson['series'][1]['data']
        }
df = pd.read_json(json.dumps(test))
df['statDate'] = datetime.datetime.now()
df['cat1'] = '住宅家具'
df['cat2'] = '成套家具'

debugStop = '1'
